package com.oyc.demo.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.oyc.demo.domain.Cablebasic;
import com.oyc.demo.domain.Enter;
import com.oyc.demo.domain.Passrate;
import com.oyc.demo.mapper.CablebasicMapper;
import com.oyc.demo.service.CablebasicService;

/**
 * (Cablebasic)表服务实现类
 *
 * @author 杜学森
 * @since 2021-01-20 18:51:53
 */
@Service
public class CablebasicServiceImpl implements CablebasicService {

    @Autowired
    private CablebasicMapper cablebasicMapper;

    /**
     * 通过ID查询单条数据
     *
     * @param reelnumber 主键
     * @return 实例对象
     */
    @Override
    public List<Cablebasic> queryExcel(Cablebasic cablebasic) {
        return cablebasicMapper.queryExcel(cablebasic);
    }

    /**
     * 查询多条数据
     *
     * @param offset 查询起始位置
     * @param limit  查询条数
     * @return 对象列表
     */
    @Override
    public List<Cablebasic> queryAllByLimit(int offset, int limit) {
        return cablebasicMapper.queryAllByLimit(offset, limit);
    }

    /**
     * 新增数据
     *
     * @param cablebasic 实例对象
     * @return 实例对象
     */
    @Override
    public Cablebasic insert(Cablebasic cablebasic) {
    	cablebasicMapper.insert(cablebasic);
        return cablebasic;
    }

    /**
     * 修改数据
     *
     * @param cablebasic 实例对象
     * @return 实例对象
     */
    @Override
    public void update(Cablebasic cablebasic) {
        cablebasicMapper.update(cablebasic);
    }

    /**
     * 通过主键删除数据
     *
     * @param reelnumber 主键
     * @return 是否成功
     */
    @Override
    public void deleteById(String reelnumber) {
    	cablebasicMapper.deleteById(reelnumber);
    }

    @Override
    public List<Map<String, String>> queryAll(Cablebasic cablebasic) {
        return cablebasicMapper.queryAll(cablebasic);
    }

	@Override
	public void insertBatch(List<Cablebasic> entities) {
		// TODO Auto-generated method stub
		cablebasicMapper.insertBatch(entities);
	}

	@Override
	public List<Enter> enter() {
		// TODO Auto-generated method stub
		return cablebasicMapper.enter();
	}

	@Override
	public List<Passrate> passrate() {
		// TODO Auto-generated method stub
		return cablebasicMapper.passrate();
	}


}